home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 05.zip / BS1 part 5 / SASC_6.0_Disk_4.adf / Compiler_Headers / Include / hardware / custom.h < prev    next >
C/C++ Source or Header  |  1992-07-30  |  5KB  |  181 lines

  1. #ifndef    HARDWARE_CUSTOM_H
  2. #define    HARDWARE_CUSTOM_H
  3. /*
  4. **    $Filename: hardware/custom.h $
  5. **    $Release: 2.04 Includes, V37.4 $
  6. **    $Revision: 36.4 $
  7. **    $Date: 90/11/05 $
  8. **
  9. **    Offsets of Amiga custom chip registers
  10. **
  11. **    (C) Copyright 1985-1991 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. */
  14.  
  15. #ifndef EXEC_TYPES_H
  16. #include "exec/types.h"
  17. #endif /* EXEC_TYPES_H */
  18.  
  19.  
  20.  
  21. /*
  22.  * do this to get base of custom registers:
  23.  * extern struct Custom custom;
  24.  */
  25.  
  26.  
  27. struct Custom {
  28.     UWORD   bltddat;
  29.     UWORD   dmaconr;
  30.     UWORD   vposr;
  31.     UWORD   vhposr;
  32.     UWORD   dskdatr;
  33.     UWORD   joy0dat;
  34.     UWORD   joy1dat;
  35.     UWORD   clxdat;
  36.     UWORD   adkconr;
  37.     UWORD   pot0dat;
  38.     UWORD   pot1dat;
  39.     UWORD   potinp;
  40.     UWORD   serdatr;
  41.     UWORD   dskbytr;
  42.     UWORD   intenar;
  43.     UWORD   intreqr;
  44.     APTR    dskpt;
  45.     UWORD   dsklen;
  46.     UWORD   dskdat;
  47.     UWORD   refptr;
  48.     UWORD   vposw;
  49.     UWORD   vhposw;
  50.     UWORD   copcon;
  51.     UWORD   serdat;
  52.     UWORD   serper;
  53.     UWORD   potgo;
  54.     UWORD   joytest;
  55.     UWORD   strequ;
  56.     UWORD   strvbl;
  57.     UWORD   strhor;
  58.     UWORD   strlong;
  59.     UWORD   bltcon0;
  60.     UWORD   bltcon1;
  61.     UWORD   bltafwm;
  62.     UWORD   bltalwm;
  63.     APTR    bltcpt;
  64.     APTR    bltbpt;
  65.     APTR    bltapt;
  66.     APTR    bltdpt;
  67.     UWORD   bltsize;
  68.     UBYTE   pad2d;
  69.     UBYTE   bltcon0l;    /* low 8 bits of bltcon0, write only */
  70.     UWORD   bltsizv;
  71.     UWORD   bltsizh;    /* 5e */
  72.     UWORD   bltcmod;
  73.     UWORD   bltbmod;
  74.     UWORD   bltamod;
  75.     UWORD   bltdmod;
  76.     UWORD   pad34[4];
  77.     UWORD   bltcdat;
  78.     UWORD   bltbdat;
  79.     UWORD   bltadat;
  80.     UWORD   pad3b[3];
  81.     UWORD deniseid;   /* 7c */
  82.     UWORD   dsksync;
  83.     ULONG   cop1lc;
  84.     ULONG   cop2lc;
  85.     UWORD   copjmp1;
  86.     UWORD   copjmp2;
  87.     UWORD   copins;
  88.     UWORD   diwstrt;
  89.     UWORD   diwstop;
  90.     UWORD   ddfstrt;
  91.     UWORD   ddfstop;
  92.     UWORD   dmacon;
  93.     UWORD   clxcon;
  94.     UWORD   intena;
  95.     UWORD   intreq;
  96.     UWORD   adkcon;
  97.     struct  AudChannel {
  98.       UWORD *ac_ptr; /* ptr to start of waveform data */
  99.       UWORD ac_len;    /* length of waveform in words */
  100.       UWORD ac_per;    /* sample period */
  101.       UWORD ac_vol;    /* volume */
  102.       UWORD ac_dat;    /* sample pair */
  103.       UWORD ac_pad[2];    /* unused */
  104.     } aud[4];
  105.     APTR    bplpt[8];
  106.     UWORD   bplcon0;
  107.     UWORD   bplcon1;
  108.     UWORD   bplcon2;
  109.     UWORD   bplcon3;
  110.     UWORD   bpl1mod;
  111.     UWORD   bpl2mod;
  112.     UWORD   bplhmod;
  113.     UWORD   pad86[1];
  114.     UWORD   bpldat[8];
  115.     APTR    sprpt[8];
  116.     struct  SpriteDef {
  117.       UWORD pos;
  118.       UWORD ctl;
  119.       UWORD dataa;
  120.       UWORD datab;
  121.     } spr[8];
  122.     UWORD   color[32];
  123.     UWORD htotal;
  124.     UWORD hsstop;
  125.     UWORD hbstrt;
  126.     UWORD hbstop;
  127.     UWORD vtotal;
  128.     UWORD vsstop;
  129.     UWORD vbstrt;
  130.     UWORD vbstop;
  131.     UWORD sprhstrt;
  132.     UWORD sprhstop;
  133.     UWORD bplhstrt;
  134.     UWORD bplhstop;
  135.     UWORD hhposw;
  136.     UWORD hhposr;
  137.     UWORD beamcon0;
  138.     UWORD hsstrt;
  139.     UWORD vsstrt;
  140.     UWORD hcenter;
  141.     UWORD   diwhigh;    /* 1e4 */
  142. };
  143.  
  144. #ifdef ECS_SPECIFIC
  145.  
  146. /* defines for beamcon register */
  147. #define VARVBLANK    0x1000    /* Variable vertical blank enable */
  148. #define LOLDIS        0x0800    /* long line disable */
  149. #define CSCBLANKEN    0x0400    /* redirect composite sync */
  150. #define VARVSYNC    0x0200    /* Variable vertical sync enable */
  151. #define VARHSYNC    0x0100    /* Variable horizontal sync enable */
  152. #define VARBEAM    0x0080    /* variable beam counter enable */
  153. #define DISPLAYDUAL    0x0040    /* use UHRES pointer and standard pointers */
  154. #define DISPLAYPAL    0x0020    /* set decodes to generate PAL display */
  155. #define VARCSYNC    0x0010    /* Variable composite sync enable */
  156. #define CSBLANK    0x0008    /* Composite blank out to CSY* pin */
  157. #define CSYNCTRUE    0x0004    /* composite sync true signal */
  158. #define VSYNCTRUE    0x0002    /* vertical sync true */
  159. #define HSYNCTRUE    0x0001    /* horizontal sync true */
  160.  
  161. /* new defines for bplcon0 */
  162. #define USE_BPLCON3    1
  163.  
  164. /* new defines for bplcon2 */
  165. #define BPLCON2_ZDCTEN        (1<<10) /* colormapped genlock bit */
  166. #define BPLCON2_ZDBPEN        (1<<11) /* use bitplane as genlock bits */
  167. #define BPLCON2_ZDBPSEL0    (1<<12) /* three bits to select one */
  168. #define BPLCON2_ZDBPSEL1    (1<<13) /* of 8 bitplanes in */
  169. #define BPLCON2_ZDBPSEL2    (1<<14) /* ZDBPEN genlock mode */
  170.  
  171. /* defines for bplcon3 register */
  172. #define BPLCON3_EXTBLNKEN    (1<<0)    /* external blank enable */
  173. #define BPLCON3_EXTBLKZD    (1<<1)    /* external blank ored into trnsprncy */
  174. #define BPLCON3_ZDCLKEN    (1<<2)    /* zd pin outputs a 14mhz clock*/
  175. #define BPLCON3_BRDNTRAN    (1<<4)    /* border is opaque */
  176. #define BPLCON3_BRDNBLNK    (1<<5)    /* border is opaque */
  177.  
  178. #endif    /* ECS_SPECIFIC */
  179.  
  180. #endif    /* HARDWARE_CUSTOM_H */
  181.